﻿#include <QCoreApplication>
#include <QTranslator>
#include <QLibraryInfo>
#include <QLocale>

#include "customtranslator.h"

void Custom::initTranslator()
{
    QLocale local = QLocale(QLocale::Chinese, QLocale::China);
    QLocale::setDefault(local);
    QTranslator translator;
    translator.load(local,
                    "qt",
                    "_",
                    QLibraryInfo::location(QLibraryInfo::TranslationsPath));
    qApp->installTranslator(&translator);
}
